import sun.tracing.ProbeSkeleton;

import java.util.HashMap;

public class No060 {
    /**
     * 把n个骰子扔在地上，所有骰子朝上一面的点数之和为s。
     * 输入n，打印出s的所有可能的值出现的概率。
     */
    static int maxValue = 6;

    public static HashMap<Integer, Double> Probability(int number) {
        HashMap<Integer, Double> map = new HashMap<>();
        if (number < 1) return null;
        int[] probabilities1 = new int[maxValue * number + 1];
        int[] probabilities2 = new int[maxValue * number + 1];
        boolean flag = true;
        for (int i = 1; i <= maxValue; i++) {
            probabilities1[i] = 1;
        }
        for (int k = 2; k <= number; k++) {
            for (int i = 0; i < k; i++) {
                if (flag) probabilities2[i] = 0;
                else probabilities1[i] = 0;
            }
            for (int i = k; i <= maxValue * k; i++) {
                if (flag) probabilities2[i] = 0;
                else probabilities1[i] = 0;
                for (int j = 1; j <= i && j <= maxValue; j++) {
                    if (flag) probabilities2[i] += probabilities1[i - j];
                    else probabilities1[i] += probabilities2[i - j];
                }
            }
            flag = !flag;
        }
        double total = Math.pow(maxValue, number);
        for (int i = number; i <= maxValue * number; i++) {
            double ratio;
            if (flag) {
                ratio = (double) probabilities1[i] / total;
            } else {
                ratio = (double) probabilities2[i] / total;
            }
            map.put(i, ratio);
        }
        return map;
    }

    public static void main(String[] args) {
        System.out.println(Probability(2));
    }

}
